public class StandardDeserializer : GGNetworkDeserializer
{
	public delegate void OnAction();

	public delegate void OnAllAction(int type);

	public delegate void OnIntro(MIntro intro);

	public OnAction onHandShake;

	public OnAllAction onAllActionMessages;

	public OnIntro onIntro;

	void GGNetworkDeserializer.Deserialize(int type, GGNetwork network)
	{
		switch (type)
		{
		case 0:
			CallOnActionMessage(onHandShake, type);
			break;
		case 1:
		{
			MIntro intro = default(MIntro);
			intro.Deserialize(network);
			if (onIntro != null)
			{
				onIntro(intro);
			}
			break;
		}
		}
	}

	private void CallOnActionMessage(OnAction action, int type)
	{
		if (onAllActionMessages != null)
		{
			onAllActionMessages(type);
		}
		if (action != null)
		{
			action();
		}
	}
}
